package net.kazed.nextaction.database.serialize;

import net.kazed.nextaction.database.backup.RestoreDao;
import android.database.sqlite.SQLiteDatabase;

public class BackupRootHandler extends AbstractElementHandler {

   private ContextHandler contextHandler;
   private TaskHandler taskHandler;

   public BackupRootHandler(RestoreDao backupDao, SQLiteDatabase database) {
      super();
      contextHandler = new ContextHandler(database);
      taskHandler = new TaskHandler(backupDao, database, contextHandler.getContextIdTranslation());

      addElementHandler("nextaction", this);
      addElementHandler(RestoreContext.ELEMENT_NAME, contextHandler);
      addElementHandler(RestoreTask.ELEMENT_NAME, taskHandler);
   }

}
